#include <stdio.h>
#include <unistd.h>

char state[] = "/-\\-";

int main()
{
	char arr[102] = { 0 }; 
	int i = 0;

	while(i <= 100)
	{
		printf("[%-100s][%3d%%][%c]\r", arr, i, state[i%4]);
		arr[i] = '#';
		i++;

		usleep(10000);
		fflush(stdout);
	}
	printf("\n");
	
}
